﻿using Management.Domain;
using Management.Models.BOMBasicInformation;
using Microsoft.EntityFrameworkCore;

namespace Management.Infrastructure
{
    /// <summary>
    /// 上下文
    /// </summary>
    public class ApplicationContext : DbContext
    {
        // 构造函数，用于接收 DbContextOptions
        public ApplicationContext(DbContextOptions<ApplicationContext> options)
            : base(options)
        {

        }


        //------------------------------------------------------------------BOM管理
        public DbSet<BasicInformation> BasicInformations { get; set; }
        public DbSet<DateType> DateTypes { get; set; }
        public DbSet<Unit> Units { get; set; }
        //------------------------------------------------------------------物料管理
        public DbSet<Material> Materials { get; set; }
        public DbSet<MaterialClassification> MaterialClassification { get; set; }
        public DbSet<MaterialProperty> MaterialPropertys { get; set; }
        public DbSet<MaterialType> MaterialTypes { get; set; }
        //------------------------------------------------------------------产品管理
        public DbSet<Product> Products { get; set; }
        public DbSet<ProductClassification> ProductClassifications { get; set; }
        public DbSet<ProductAttribute> ProductAttributes { get; set; }
        public DbSet<ProductType> ProductTypes { get; set; }

        //------------------------------------------------------------------生产管理
        public DbSet<ProductionOrder> ProductionOrders { get; set; }

    }
}
